package com.hc.demo_api820.controller;

import com.hc.demo_api820.dto.CalendarRequestDto;
import com.hc.demo_api820.dto.ResultResponse;
import com.hc.demo_api820.service.CalendarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CalendarController {

    //CalendarController--》CalendarService -->很多Mapper

    /**
     * 界面需要某个月的日历
     * 和一些占位，不然第一天就会怼着周日
     * 日历中未来30天黑色高亮显示，并且有余数号
     * */

    @Autowired
    CalendarService calendarService;


    @RequestMapping("/lisetCalendar")
    public ResultResponse lisetCalendar(@RequestBody CalendarRequestDto calendarRequestDto) {
        return new ResultResponse(ResultResponse.SUCCESS_CODE,ResultResponse.SUCCESS_DESC,calendarService.listCalendarWithRemainder(calendarRequestDto.getYear(),calendarRequestDto.getMonth(),calendarRequestDto.getHpId()));
//        return null;
    }
}
